package com.shadow.demo.data.variable;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.shadow.demo.data.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 环境变量
 */
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@TableName("DEMO_VARIABLE")
public class VariableEntity extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 5316267272941017419L;

    /**
     * 字典值.
     **/
    @NotBlank(message = "字典值不能为空")
    private String value;

    /**
     * 字典名称.
     **/
    @NotBlank(message = "字典名称不能为空")
    private String name;

    /**
     * 上级编码.
     **/
    @NotBlank(message = "上级编码不能为空")
    private String parentId;

    /**
     * parentId下显示序号.
     **/
    private Integer orders;
    /**
     * 描述.
     **/
    private String description;
    /**
     * 查询属性.
     **/
    @TableField(exist = false)
    private String search;
    /**
     * 上级字典名称：前端显示属性.
     **/
    @TableField(exist = false)
    private String parentName;
}
